from functools import cmp_to_key
from sys import *
set_int_max_str_digits(1000000)
n = int(input())
lst = []
king = [int(i) for i in input().split()]
for i in range(n):
    lst.append([int(i) for i in input().split()])

def cmp(x, y):
    if x[0] * x[1] > y[0] * y[1]:
        return 1
    else:
        return -1
lst.sort(key=cmp_to_key(cmp))

a, ans = 0, king[0]
for i in range(n):
    a = max(a, ans // lst[i][1])
    ans *= lst[i][0]
print(a)

